package com.sicau.socialpracticesystem.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 * 支队表
 * </p>
 *
 * @author sxt && ttxxi
 * @since 2021-04-26
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Team对象", description = "支队表")
@Entity
@Table(name = "team")
public class Team implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @ApiModelProperty(value = "支队名称")
    @Column(name = "team_name", length = 30)
    private String teamName;

    @ApiModelProperty(value = "创建者(队长)id")
    @Column(name = "creator_id")
    private Integer creatorId;

    @ApiModelProperty(value = "社会实践类型id")
    @Column(name = "type_id")
    private Integer typeId;

    @ApiModelProperty(value = "开始时间")
    @Column(name = "start_time")
    private LocalDate startTime;

    @ApiModelProperty(value = "结束时间")
    @Column(name = "end_time")
    private LocalDate endTime;

    @ApiModelProperty(value = "指导老师")
    @Column(name = "instructor", length = 10)
    private String instructor;

    @ApiModelProperty(value = "团队容量")
    @Column(name = "all_member_count")
    private Integer allMemberCount;

    @ApiModelProperty(value = "已招成员数量")
    @Column(name = "has_member_count")
    private Integer hasMemberCount;

    @ApiModelProperty(value = "实践出发地经度")
    @Column(name = "origin_lng")
    private Double originLng;

    @ApiModelProperty(value = "实践出发地纬度")
    @Column(name = "origin_lat")
    private Double originLat;

    @ApiModelProperty(value = "做成下拉框吧，实践出发地(0: 成都校区、1: 雅安校区、2: 都江堰校区)")
    @Column(name = "origin_address")
    private Integer originAddress;

    @ApiModelProperty(value = "实践目标地经度")
    @Column(name = "destination_lng")
    private Double destinationLng;

    @ApiModelProperty(value = "实践目标地纬度")
    @Column(name = "destination_lat")
    private Double destinationLat;

    @ApiModelProperty(value = "实践目标地详细地址")
    @Column(name = "destination_address", length = 100)
    private String destinationAddress;

    @ApiModelProperty(value = "团队进度(0: 新建, 1: 立项, 2: 开始, 3: 新闻稿, 4: 结束)")
    @Column(name = "progress")
    private Integer progress;

    @ApiModelProperty(value = "是否优秀团队(0: 否, 1: 是)")
    @Column(name = "excellent_team")
    private Integer excellentTeam;
}
